package ratemymacclass

class Course {

    String title
    String department
    int courseNum

    String toString() {
        "$title: $department $courseNum"
    }

    static hasMany = [
         ratings : Rating
    ]

    static constraints = {
        title()
        department()
        courseNum()
        ratings(nullable: true)
    }
}
